/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cn.com.leon.utils;

import cn.com.leon.ui.tree.FileNode;
import javax.swing.JOptionPane;

/**
 *
 * @author Justin
 */
public class ListFiles {

    public static void openfiles(FileNode file) {
        if (!file.getFile().exists()) {
            JOptionPane.showMessageDialog(null, "Error reading " + file.getFile().getAbsolutePath(), "Warning", JOptionPane.WARNING_MESSAGE);
        } else if (file.getFile().isDirectory()) {   
            FilesShow.showdir(file);
        } else {
            FilesShow.showfile(file);
        }
    }
}

